package com.qc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qc.dao.BusinessReceiveDao;
import com.qc.entity.BusinessReceive;
import com.qc.service.BusinessReceiveService;

@Service("businessReceiveService")
public class BusinessReceiveServiceImpl implements BusinessReceiveService{

	@Resource(name="businessReceiveDao")
	private BusinessReceiveDao businessReceiveDao;
	
	@Override
	public int saveBusinessReceive(BusinessReceive businessReceive) {

		return businessReceiveDao.saveBusinessReceive(businessReceive);
	}

	@Override
	public List<BusinessReceive> listeceive(long userId, long shopId,long couponId) {

		return businessReceiveDao.listeceive(userId, shopId,couponId);
	}
	
	@Override
	public List<BusinessReceive> listUserReceive(long userId,long shopId, int state, int pageNo, int pageSize) {

		return businessReceiveDao.listUserReceive(userId,shopId, state, pageNo, pageSize);
	}
	
	@Override
	public List<BusinessReceive> listAllReceive(long shopId, int pageNo, int pageSize) {

		return businessReceiveDao.listAllReceive(shopId, pageNo, pageSize);
	}

	@Override
	public int getListReceiveCount(long shopId) {

		return businessReceiveDao.getListReceiveCount(shopId);
	}

	@Override
	public int updateBusinessReceiveState(BusinessReceive businessReceive) {

		return businessReceiveDao.updateBusinessReceiveState(businessReceive);
	}

	@Override
	public int getSerchReceive(long shopId, long userId, long couponId) {

		return businessReceiveDao.getSerchReceive(shopId, userId, couponId);
	}

	@Override
	public BusinessReceive getCouponNumber(long shopId, String couponNumber) {

		return businessReceiveDao.getCouponNumber(shopId, couponNumber);
	}




}
